package com.itheima.dao;

import com.itheima.domain.Contact;
import com.itheima.domain.ContactCondition;

import java.sql.SQLException;
import java.util.List;

public interface ContactDao {
    List<Contact> queryAll() throws SQLException;

    int add(Contact con) throws SQLException;

    Contact queryById(int id) throws SQLException;

    int update(Contact contact) throws SQLException;

    int delete(int id) throws SQLException;

    Integer queryForPageTotalCount() throws SQLException;

    List<Contact> queryForPageItems(int begin, int pageSize) throws SQLException;

    List<Contact> queryForCondition(ContactCondition contactCondition) throws SQLException;
}
